//
//  LSZQualificationApplicationResultsManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/8/31.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZQualificationApplicationResultsManager.h"

@implementation LSZQualificationApplicationResultsManager
-(id)initWithQualificationApplicationResults :(NSDictionary *)diction
{
    self = [super init];
    if (self) {
        if ([[diction valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[diction valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![diction valueForKey:@"data"]) {
            return self;
        }
        NSDictionary * dictData = diction[@"data"];
        self.name  = NullStringjudgment(NSStr(dictData[@"name"]));
        self.contact  = NullStringjudgment(NSStr(dictData[@"contact"]));
        self.address  = NullStringjudgment(NSStr(dictData[@"address"]));
        self.mechanism  = NullStringjudgment(NSStr(dictData[@"mechanism"]));
        self.identityID  = NullStringjudgment(NSStr(dictData[@"identity"]));
        self.identityStr = NullStringjudgment(NSStr(dictData[@"identity_name"]));
        NSArray * card_url = dictData[@"card_url"];
        NSString * card = NullStringjudgment(NSStr(dictData[@"card"]));
        NSArray *arrayCard = [card componentsSeparatedByString:@","]; //从字符A中分隔成2个元素的数组

        self.positive  = NullStringjudgment(NSStr(card_url[0]));
        self.reverse  = NullStringjudgment(NSStr(card_url[1]));
        self.positiveID = arrayCard[0];
        self.reverseID = arrayCard[1];
        NSArray * images_url = dictData[@"images_url"];
        self.images  = NullStringjudgment(NSStr(images_url[0]));
        self.imagesID = NullStringjudgment(NSStr(dictData[@"images"]));

        self.introduce  = NullStringjudgment(NSStr(dictData[@"introduce"]));
        self.status  = NullStringjudgment(NSStr(dictData[@"status"]));


        /*
         @property(nonatomic,strong) NSString *  identityID;//身份
         @property(nonatomic,strong) NSString *  identityStr;//身份
         @property(nonatomic,strong) NSString *  positive;//正
         @property(nonatomic,strong) NSString *  reverse;//反
         @property(nonatomic,strong) NSString *  images;//资质证书
         @property(nonatomic,strong) NSString *  positiveID;//正
         @property(nonatomic,strong) NSString *  reverseID;//反
         @property(nonatomic,strong) NSString *  imagesID;//资质证书
         */
    }
    return self;
}
@end
